<%@page import="com.cn.entity.Doctor"%>
<%@page import="com.cn.entity.Department"%>
<%@page import="com.cn.entity.User"%>
<%@page import="com.cn.entity.Zhenduan"%>
<%@page import="java.util.List"%>
<%@page import="com.cn.dao.ZhenduanDao"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>北京医院</title>
</head>


<body>

<%Object o=session.getAttribute("doctor");
if (o!=null){
	Doctor doctor=(Doctor)o;
	Department dep=doctor.getDepartment();

%>



<table>

<tr>

<td>编号</td>
<td>患者姓名</td>
<td>挂号时间</td>
<td>操作</td>
</tr>

<%ZhenduanDao zd=new ZhenduanDao();
List<Zhenduan> list=zd.scanAll();

for (int i=0;i<list.size();i++){
	
	Zhenduan zhenduan=list.get(i);
	User user=zhenduan.getUser();
	Department department=zhenduan.getDepartment();
	
	if (department.getDepartmentid()==dep.getDepartmentid()) {
		
		
		if(zhenduan.getAdvise()==null&&zhenduan.getResult()==null){
	
%>



<tr>

<td><%=i+1 %></td>
<td><%=user.getXingming() %></td>
<td><%=zhenduan.getDate() %></td>
<td><a href="doctor_zhenduan.jsp?zhenduanid=<%=zhenduan.getZhenduanid()%>">详细</a></td>
</tr>
<%} }}%>

</table>


<%}else { %>


<p>404</p>
<%} %>
</body>



</html>